Various classes of block diagrams describe computations that can be performed on application specific computational hardware, such as a computer, microcontroller, FPGA, and custom hardware. Classes of such block diagrams include time-based block diagrams such as those found within Simulink® from the MathWorks, Inc. Natick Ma, state-based and flow diagrams such as those found within Stateflow® from the MathWorks, Inc. Natick Ma., and data-flow diagrams. A common characteristic among these various forms of block diagrams is that they define semantics on how to execute the diagram.
Historically, engineers and scientists have utilized time-based block diagram models in numerous scientific areas such as Feedback Control Theory and Signal Processing to study, design, debug, and refine dynamic systems. Dynamic systems, which are characterized by the fact that their behaviors change over time, are representative of many real-world systems. Time-based block diagram modeling has become particularly attractive over the last few years with the advent of software packages such as Simulink® from The MathWorks, Inc. of Natick, Mass. Such packages provide sophisticated software platforms with a rich suite of support tools that makes the analysis and design of dynamic systems efficient, methodical, and cost-effective.
A dynamic system (either natural or man-made) is a system whose response at any given time is a function of its input stimuli, its current state, and the current time. Such systems range from simple to highly complex systems. Physical dynamic systems include a falling body, the rotation of the earth, bio-mechanical systems (muscles, joints, etc.), bio-chemical systems (gene expression, protein pathways), weather and climate pattern systems, etc. Examples of man-made or engineered dynamic systems include: a bouncing ball, a spring with a mass tied on an end, automobiles, airplanes, control systems in major appliances, communication networks, audio signal processing, nuclear reactors, a stock market, etc. Professionals from diverse areas such as engineering, science, education, and economics build mathematical models of dynamic systems in order to better understand system behavior as it changes with the progression of time. The mathematical models aid in building “better” systems, where “better” may be defined in terms of a variety of performance measures such as quality, time-to-market, cost, speed, size, power consumption, robustness, etc. The mathematical models also aid in analyzing, debugging and repairing existing systems (be it the human body or the anti-lock braking system in a car). The models may also serve an educational purpose of educating others on the basic principles governing physical systems. The models and results are often used as a scientific communication medium between humans. The term “model-based design” is used to refer to the use of block diagram models in the development, analysis, and validation of dynamic systems.
Block diagrams are a set of graphical connections between blocks to model the above-described dynamic systems. The individual blocks in a block diagram represent mathematical operations and output a result.
The operating conditions of a physical model define its total “state” at any given time. For example, for a model of a car engine, the operating conditions are typically described by variables such as engine speed, throttle angle, engine temperature, and the surrounding atmospheric condition. The behavior or what it typically known as the “dynamics” of the model are generally affected by the levels of the operating conditions. For example in a car, the behavior of an engine can greatly vary if the car is being operated in the high elevations of Colorado or the low elevations of Florida.
A trim or equilibrium operating condition is a special type of operating condition. A basic description of trim or equilibrium operating conditions is that, over time, the operating condition remains steady and constant. An example of a physical system at an equilibrium condition would be a car using its cruise control on a flat road. After a short period of time, the car will throttle up to a desired speed and continue down the road at this speed without deviating. When the same car is traveling up and down a mountainous road, and the cruise control cannot maintain a constant speed. This would be an example of a physical system not at an equilibrium condition. In such a case, the speed and the fuel consumption rates of the car continuously vary.
The process of linearization is the approximation of complex physical models (i.e., non-linear models) that yields a sufficiently simple linear model for engineering analysis tools. Linearization is a well-known commonly used analysis tool that has been documented in many control textbooks. A fundamental principle of linearization analysis is that the approximation of a complex physical model is accurate for regions near a baseline, equilibrium, or operating condition.
In Simulink® and other block diagram simulation applications and tools there are two conventional approaches to specifying equilibrium conditions of a physical model. The first approach involves the user employing their intuitive knowledge about the system to pick an equilibrium condition. This can be a very time consuming and difficult process due to the large number of operating conditions that must be specified in a complex physical model. The second approach involves the user employing a method known as trim analysis. The approach is to use optimization to solve for a set of operating conditions that satisfy the equilibrium conditions. The definition of an equilibrium position of a physical system modeled using the form of equation (h) shown later herein is described as:
                                                                        x                .                            ⁡                              (                t                )                                                          =                                              f              ⁡                              (                                                      x                    ⁡                                          (                      t                      )                                                        ,                                                            x                      1                                        ⁡                                          (                                              k                        1                                            )                                                        ,                  …                  ⁢                                                                          ,                                                            x                      m                                        ⁡                                          (                                              k                        m                                            )                                                        ,                                      u                    ⁡                                          (                      t                      )                                                                      )                                                          =                                0                                                                              x                1                            ⁡                              (                                                      k                    1                                    +                  1                                )                                                          =                                                              f                1                            ⁡                              (                                                      x                    ⁡                                          (                      t                      )                                                        ,                                                            x                      1                                        ⁡                                          (                                              k                        1                                            )                                                        ,                  …                  ⁢                                                                          ,                                                            x                      m                                        ⁡                                          (                                              k                        m                                            )                                                        ,                                      u                    ⁡                                          (                      t                      )                                                                      )                                                          =                                                              x                1                            ⁡                              (                                  k                  1                                )                                                                          ⋮                                                                                          ⋮                                                                                          ⋮                                                                              x                m                            ⁡                              (                                                      k                    m                                    +                  1                                )                                                          =                                                              f                i                            ⁡                              (                                                      x                    ⁡                                          (                      t                      )                                                        ,                                                            x                      1                                        ⁡                                          (                                              k                        1                                            )                                                        ,                  …                  ⁢                                                                          ,                                                            x                      m                                        ⁡                                          (                                              k                        m                                            )                                                        ,                                      u                    ⁡                                          (                      t                      )                                                                      )                                                          =                                                              x                m                            ⁡                              (                                  k                  m                                )                                                                                        y              ⁡                              (                t                )                                                          =                                              g              ⁡                              (                                                      x                    ⁡                                          (                      t                      )                                                        ,                                                            x                      1                                        ⁡                                          (                                              k                        1                                            )                                                        ,                  …                  ⁢                                                                          ,                                                            x                      m                                        ⁡                                          (                                              k                        m                                            )                                                        ,                                      u                    ⁡                                          (                      t                      )                                                                      )                                                          =                                                              y                c                            .                                                          (        a        )            Equation (a) describes an operating condition where:                The continuous derivatives, x(t), are zero        The discrete states when updated remain the same (xi(ki+1)=xi(ki))        The output of the model y(t) is equal to a user defined level yc Trim analysis works well for small models, but for large models, initial guesses of the values x(t), x1(k1), . . . , xi(ki) and u(t) must be chosen very close to an equilibrium operating condition. Choosing initial values can be a problem in complex models since there are a large number of unknown variables that must be specified.        
In addition, in other simulation programs, such as SystemBuild™ offered by National Instruments Corporation of Austin, Tex., users have the ability to simulate a model to a single final operating point and then linearize via the command line. To execute such a function, a user can enter a series of commands as follows. The first is to simulate a model to a final time specified by t. The external inputs to the model are specified by u.                >>y=sim(model,t,u);        
The next step is to linearize the model. The {resume} argument tells the linearization to use the last operating condition. The variable “sys” is the linear model that is returned.                >>sys=lin(model, {resume});        
However, this feature does not allow users to automate the process of linearization at multiple event based operating conditions during simulation. Instead, linearization is based the final operating condition after a simulation is completed.